{
Alisa_Barkar
25/10/12
}
program PPi1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  N, N0,i, j:integer;
  fout:textFile;
  x0, y0, R:real;
begin
  assignFile (fout, 'output.txt');
  rewrite(fout);
    for j:=1 to 10000000 do
    begin
      randomize;
      x0:=2*random;
      y0:=2*random;
      if ((x0-1)*(x0-1)+(y0-1)*(y0-1)<=1) then
        N0:=N0+1;
      N:=N+1;
      if (N0 mod 1000 = 0) then
      begin
        R:= Pi-(N0/N*4);
        writeln (fout, R:0:16);
      end;
    end;
  closeFile (fout);
end.
